<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <include file="Public:head"/>
  <link rel="stylesheet" media="all" type="text/css" href="/Public/css/jquery-ui.css" />
  <link rel="stylesheet" media="all" type="text/css" href="/Public/css/jquery-ui-timepicker-addon.css" />
</head>
<body>
<style type="text/css">
    .m-li{
        float: left;
    }
    .active{
        border-bottom:2px solid #0a6ebd;
    }
</style>
  <div class="panel admin-panel">
    <ul>
        <li class="panel-head"> <a href="{:U('message',array('status'=>1))}"><strong class="icon-reorder">留言列表</strong></a></li>
    </ul>
      <div style="clear:both;"></div>
    <form action="{:U('')}">
     <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li>搜索：</li>
        <li>
          <input type="text" placeholder="开始时间" name="b_time" class="input"  id="b_time" style="width:180px; line-height:17px;display:inline-block" value="{$b_time}">
          <input type="text" placeholder="截止时间" name="e_time" class="input" id="e_time" style="width:180px; line-height:17px;display:inline-block" value="{$e_time}">
          <input type="text" placeholder="请输入发帖人" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block" value="{$keywords}">
          <button type="submit"class="button border-main icon-search" > 搜索</button></li>
       <neq name="status" value="0">
        <li>
        </li>
       </neq>
      </ul>
    </div>
    </form>
    <table class="table table-hover text-center">
      <tr>
        <th width="10%">发帖人</th>
          <th width="10%">是否匿名</th>
          <th width="30%">内容</th>
          <th width="10%">留言时间</th>
        <th>操作</th>
      </tr>      
        <volist name="list" id="l">
          <tr>
              <td>
                <span style="font-size: 15px;"><a href="{:U('user',array('keywords'=>$l['username']))}">{:M('Users')->where(array('user_id'=>$l['user_id']))->getField('nickname')}</a></span>
            </td>
            <td><eq name="l.is_show_name" value="0">是<else/>否</eq></td>
              <td> {:msubstr($l['content'],0,15)}</td>
              <td>{:date('Y-m-d H:i:s',$l['add_time'])}</td>
            <td>
              <div class="button-group edit_btn" data-content="{$l.content}"> <a class="button border-blue" href="javascript:void(0)"><span class=" icon-list"></span> 详情</a> </div>
            </td>
          </tr>
        </volist>
      <tr>
        <td colspan="8" class="page">{$show}</td>
      </tr>
    </table>
  </div>
</body>
<script type="text/javascript" src="/Public/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/Public/js/jquery-ui-timepicker-addon.min.js"></script>
<script type="text/javascript" src="/Public/js/jquery-ui-timepicker-zh-CN.js"></script>
</html>
<script type="text/javascript">

   $(function () {

       $('#b_time,#e_time').datetimepicker({

       });
       $('.edit_btn').click(function(){
           var con = $(this).attr('data-content');
           swal({
               title: "留言内容",
               text: con,
               html: true
           }, function(){
       });
       });





   })

</script>